import Vue from 'vue'
import Router from 'vue-router'
import extend from './views/extend.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'extend',
        redirect:"/index",
      component: extend,
        children:[
            {
                path: '/index',
                name: 'index',
                component: function () {
                    return import(/* webpackChunkName: "about" */ './views/index.vue')
                }
            },
            {
                path: '/kandeng',
                name: 'ad',
                component: function () {
                    return import(/* webpackChunkName: "about" */ './views/ad.vue')
                }
            },
            {
                path: '/jiameng',
                name: 'jiameng',
                component: function () {
                    return import(/* webpackChunkName: "about" */ './views/jiameng.vue')
                }
            },
            {
                path: '/pinpai/:order',
                name: 'pinpai',
                component: function () {
                    return import(/* webpackChunkName: "about" */ './views/pinpai.vue')
                }
            },
            {
                path: '/jiamengzhan',
                name: 'jiamengzhan',
                component: function () {
                    return import(/* webpackChunkName: "about" */ './views/jiamengzhan.vue')
                }
            },
            {
                path: '/privacy',
                name: 'privacy',
                component: function () {
                    return import(/* webpackChunkName: "about" */ './views/privacy.vue')
                }
            },
            {
                path: '/service',
                name: 'service',
                component: function () {
                    return import(/* webpackChunkName: "about" */ './views/service.vue')
                }
            },
            {
                path: '/fazhan',
                name: 'fazhan',
                component: function () {
                    return import(/* webpackChunkName: "about" */ './views/fazhan.vue')
                }
            },
            {
                path: '/register',
                name: 'register',
                component: function () {
                    return import(/* webpackChunkName: "about" */ './views/register.vue')
                }
            },
          {
            path: '/search',
            name: 'search',
            component: function () {
              return import(/* webpackChunkName: "about" */ './views/search.vue')
            }
          },
          {
            path: '/contact',
            name: 'contact',
            component: function () {
              return import(/* webpackChunkName: "about" */ './views/contact.vue')
            }
          },
          {
            path: '/proposal',
            name: 'proposal',
            component: function () {
              return import(/* webpackChunkName: "about" */ './views/proposal.vue')
            }
          },
          {
            path: '/about',
            name: 'about',
            component: function () {
              return import(/* webpackChunkName: "about" */ './views/about.vue')
            }
          },
          {
            path: '/coach',
            name: 'coach',
            component: function () {
              return import(/* webpackChunkName: "about" */ './views/coach.vue')
            }
          },
          {
            path: '/user',
            name: 'user',
            component: function () {
              return import(/* webpackChunkName: "about" */ './views/user.vue')
            }
          },
          {
            path: '/news',
            name: 'news',
            component: function () {
              return import(/* webpackChunkName: "about" */ './views/newsPage.vue')
            }
          },
          {
            path: '/pageDetail/:id',
            name: 'pageDetail',
            component: function () {
              return import(/* webpackChunkName: "about" */ './views/pageDetail.vue')
            }
          },
        ]
    },
      {
          path: '/detail/:id',
          name: 'detail',
          component: function () {
              return import(/* webpackChunkName: "about" */ './views/detail.vue')
          }
      },
      {
          path: '/login',
          name: 'login',
          component: function () {
              return import(/* webpackChunkName: "about" */ './views/login.vue')
          }
      },

  ]
})
